﻿@model List<CMP.ERP.Model.Commodity>

@{
    Layout = null;
}
@Html.Action("Account_Show", "Account");
    <div class="content">
        <body>
            <div class="header" style="margin-top:0">
                <div class="header-right">
                    <form method="post" action="/Blurb/AddComodity">
                        <div id="modal-container-973559" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:400px; margin-left:-150px;">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h3 id="myModalLabel">
                                    商品信息更新系统
                                </h3>
                            </div>
                            <div class="modal-body">
                                <table class="table table-hover table-bordered " style="width:400px;text-align:center;margin:0 auto;border:2px solid #428bca;">
                                    <tbody>
                                        <tr>
                                            <td>商品名称：</td>
                                            <td><input type="text" name="Commodity_Name" required /></td>
                                        </tr>
                                        <tr>
                                            <td>条形码：</td>
                                            <td><input type="text" name="Commodity_number" required /></td>
                                        </tr>
                                        <tr>
                                            <td>重量：</td>
                                            <td>
                                                <input type="text" name="Commodity_Weight" required />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>备注：</td>
                                            <td>
                                                <input type="text" name="Commodity_Remark" required />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>商品类型：</td>
                                            <td>
                                                @Html.DropDownList("CommodityType_Id");
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>商品价格：</td>
                                            <td>
                                                <input type="text" name="Commodity_Price" required />
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="modal-footer">
                                <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button> <button type="submit" class="btn btn-default"><span class="icon-inbox"></span>保存</button>
                            </div>
                        </div>
                    </form>@*添加*@
                </div>
            </div>
            <!-- 顶部 -->

            <div id="middle">
                <div class="Switch"></div>
                <script type="text/javascript">
                    $(document).ready(function (e) {
                        $(".Switch").click(function () {
                            $(".left").toggle();
                        });
                    });
                </script>
                <div class="right" id="mainFrame">
                    <div class="right_cont">
                        <ul class="breadcrumb">
                            当前位置：
                            <a href="/Home/Index">首页</a>
                            <span class="divider">/</span>
                            商品信息
                        </ul>
                        <div class="title_right"><strong>商品信息管理</strong></div>
                        <div style="width:100%; margin:auto">
                            <div>
                                <form method="get" action="/Blurb/SearchByName">
                                    <table>
                                        <tr>
                                            <td>商品名称：</td>
                                            <td><input type="text" name="Commodity_Name" placeholder="名称支持多关键字" /></td>
                                            <td><button type="submit" class="btn btn-default" style="margin-bottom:10px"><span class="icon-search"></span>查询 </button></td>
                                            <td><button id="modal-973559" href="#modal-container-973559" role="button" type="button" class="btn btn-default" data-toggle="modal" style="margin-bottom:10px"><span class="icon-plus"></span>新增</button></td>
                                        </tr>
                                    </table>
                                </form>
                            </div>
                            <div style="margin-top:20px;">
                                <table class="table  table-hover table-bordered table-striped">
                                    <thead>
                                        <tr>
                                            <th>商品编码</th>
                                            <th>商品名称</th>
                                            <th>条形码</th>
                                            <th>重量</th>
                                            <th>商品价格</th>
                                            <th>备注</th>
                                            <th>商品类型</th>
                                            <th>更新</th>
                                            <th>删除</th>

                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach (var item in Model)
                                        {
                                            <tr>
                                                <td>@item.Commodity_Id</td>
                                                <td>@item.Commodity_Name</td>
                                                <td>@item.Commodity_number</td>
                                                <td>@item.Commodity_Weight</td>
                                                <td>@item.Commodity_Price</td>
                                                <td>@item.Commodity_Remark</td>
                                                <td>@item.CommodityType_Name</td>
                                                <th>
                                                    <a href="/Blurb/GetCommodityById/@item.Commodity_Id" style="color:black"><span class="icon-edit"></span>更新</a>
                                                </th>
                                                <th>
                                                    <a href="/Blurb/DelComodity/@item.Commodity_Id" style="color:black" onclick="return confirm('好好考虑一下吧！')"><span class="icon-remove"></span>删除</a>
                                                </th>
                                            </tr>
                                        }
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 底部 -->
            <div id="footer">版权所有：知行科技</div>
            <script>
                !function () {
                    laydate.skin('molv');
                    laydate({ elem: '#Calendar' });
                }();

                function fun() {
                    location.href = '/Home/Index';
                }
            </script>
        </body>
    </div>







